package com.lagou.edu.controller;

import com.lagou.edu.service.EmailService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author: jie.zhao
 * @create: 2021/07/29 14:14
 */
@RestController
@RequestMapping("/api/email")
public class EmailController {

    @Resource
    EmailService emailService;

    @GetMapping("/sendCode/{email}/{code}")
    public boolean saveCode(@PathVariable String email,@PathVariable String code){
        return emailService.saveCode(email,code);
    }
}
